package gui;

import entidades.Celula;
import entidades.Controlador;
import java.awt.event.ActionEvent;
import javax.swing.JPanel;

public class Principal extends javax.swing.JFrame {

    Celula celula;
    Controlador control;
    JFrame_Lista lista;

    public Principal() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        jLabel1 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        Menu_Cria_Pilha = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        Menu_Cria_Fila = new javax.swing.JMenuItem();
        jMenu_Lista = new javax.swing.JMenu();
        jMenu_Cria_Lista_Simples = new javax.swing.JMenuItem();
        Menu_Cria_ListaDupla = new javax.swing.JMenuItem();
        MenuCria_Lista_Circular = new javax.swing.JMenuItem();
        jMenu_Listar = new javax.swing.JMenu();
        jMenu_Edita = new javax.swing.JMenu();
        jMenu_Remove = new javax.swing.JMenu();
        jMenu_Sair = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("SISTEMA DE GERENCIAMENTO DE ESTRUTURA DE DADOS"); // NOI18N
        setAlwaysOnTop(true);
        setBackground(new java.awt.Color(255, 255, 255));
        setBounds(new java.awt.Rectangle(0, 0, 2, 2));
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setForeground(java.awt.Color.white);
        setIconImages(null);
        setLocationByPlatform(true);
        setResizable(false);

        jTextArea1.setColumns(20);
        jTextArea1.setRows(5);
        jScrollPane1.setViewportView(jTextArea1);

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel1.setText("ESTRUTURAS DE DADOS");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1)
                .addContainerGap())
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(341, 341, 341)
                .addComponent(jLabel1)
                .addContainerGap(341, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 407, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jMenuBar1.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N
        jMenuBar1.setPreferredSize(new java.awt.Dimension(400, 33));

        Menu_Cria_Pilha.setText("CRIAR ESTRUTURA");
        Menu_Cria_Pilha.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N
        Menu_Cria_Pilha.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Menu_Cria_PilhaActionPerformed(evt);
            }
        });

        jMenuItem1.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N
        jMenuItem1.setText("PILHA");
        jMenuItem1.setVerifyInputWhenFocusTarget(false);
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        Menu_Cria_Pilha.add(jMenuItem1);

        Menu_Cria_Fila.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N
        Menu_Cria_Fila.setText("FILA");
        Menu_Cria_Fila.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Menu_Cria_FilaActionPerformed(evt);
            }
        });
        Menu_Cria_Pilha.add(Menu_Cria_Fila);

        jMenu_Lista.setBackground(new java.awt.Color(153, 153, 153));
        jMenu_Lista.setText("LISTA");
        jMenu_Lista.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N

        jMenu_Cria_Lista_Simples.setBackground(new java.awt.Color(153, 153, 153));
        jMenu_Cria_Lista_Simples.setText("SIMPLES");
        jMenu_Cria_Lista_Simples.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenu_Cria_Lista_SimplesActionPerformed(evt);
            }
        });
        jMenu_Lista.add(jMenu_Cria_Lista_Simples);

        Menu_Cria_ListaDupla.setBackground(new java.awt.Color(153, 153, 153));
        Menu_Cria_ListaDupla.setText("DUPLA");
        Menu_Cria_ListaDupla.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Menu_Cria_ListaDuplaActionPerformed(evt);
            }
        });
        jMenu_Lista.add(Menu_Cria_ListaDupla);

        MenuCria_Lista_Circular.setBackground(new java.awt.Color(153, 153, 153));
        MenuCria_Lista_Circular.setText("CIRCULAR");
        MenuCria_Lista_Circular.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuCria_Lista_CircularActionPerformed(evt);
            }
        });
        jMenu_Lista.add(MenuCria_Lista_Circular);

        Menu_Cria_Pilha.add(jMenu_Lista);

        jMenuBar1.add(Menu_Cria_Pilha);

        jMenu_Listar.setText("LISTAR TODOS");
        jMenu_Listar.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N
        jMenu_Listar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenu_ListarActionPerformed(evt);
            }
        });
        jMenuBar1.add(jMenu_Listar);

        jMenu_Edita.setText("EDITAR");
        jMenu_Edita.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N
        jMenu_Edita.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenu_EditaActionPerformed(evt);
            }
        });
        jMenuBar1.add(jMenu_Edita);

        jMenu_Remove.setText("REMOVER");
        jMenu_Remove.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N
        jMenu_Remove.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenu_RemoveActionPerformed(evt);
            }
        });
        jMenuBar1.add(jMenu_Remove);

        jMenu_Sair.setText("SAIR");
        jMenu_Sair.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N
        jMenu_Sair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenu_SairActionPerformed(evt);
            }
        });
        jMenuBar1.add(jMenu_Sair);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(120, 120, 120)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(37, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(61, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed

        if (evt.getSource() == jMenuItem1) {
            JFrame_Pilha fila = new JFrame_Pilha();
            fila.setVisible(true);
        }

    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void Menu_Cria_FilaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Menu_Cria_FilaActionPerformed
        if (evt.getSource() == Menu_Cria_Fila) {
            JFrame_Pilha fila = new JFrame_Pilha();
            fila.setVisible(true);
        }
    }//GEN-LAST:event_Menu_Cria_FilaActionPerformed

    private void jMenu_Cria_Lista_SimplesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenu_Cria_Lista_SimplesActionPerformed
        lista = new JFrame_Lista();
        if (evt.getSource() == jMenu_Cria_Lista_Simples) {
            lista.setVisible(true);
        }
        // TODO add your handling code here:
    }//GEN-LAST:event_jMenu_Cria_Lista_SimplesActionPerformed

    private void Menu_Cria_ListaDuplaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Menu_Cria_ListaDuplaActionPerformed
        lista = new JFrame_Lista();
        if (evt.getSource() == Menu_Cria_ListaDupla) {
            lista.setVisible(true);
        }
    }//GEN-LAST:event_Menu_Cria_ListaDuplaActionPerformed

    private void Menu_Cria_PilhaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Menu_Cria_PilhaActionPerformed
        if (evt.getSource() == jMenuItem1) {
            JFrame_Pilha pilha = new JFrame_Pilha();
            pilha.setVisible(true);
        }
    }//GEN-LAST:event_Menu_Cria_PilhaActionPerformed

    private void MenuCria_Lista_CircularActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuCria_Lista_CircularActionPerformed
        lista = new JFrame_Lista();
        if (evt.getSource() == MenuCria_Lista_Circular) {
            lista.setVisible(true);
        }
    }//GEN-LAST:event_MenuCria_Lista_CircularActionPerformed
    private void jMenu_ListarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenu_ListarActionPerformed

        
        if (evt.getSource() == jMenu_Lista) {

        }
    }//GEN-LAST:event_jMenu_ListarActionPerformed

    private void jMenu_EditaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenu_EditaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jMenu_EditaActionPerformed

    private void jMenu_RemoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenu_RemoveActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jMenu_RemoveActionPerformed

    private void jMenu_SairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenu_SairActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jMenu_SairActionPerformed
    public static void main(String args[]) {
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Metal".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Principal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem MenuCria_Lista_Circular;
    private javax.swing.JMenuItem Menu_Cria_Fila;
    private javax.swing.JMenuItem Menu_Cria_ListaDupla;
    private javax.swing.JMenu Menu_Cria_Pilha;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenu_Cria_Lista_Simples;
    private javax.swing.JMenu jMenu_Edita;
    private javax.swing.JMenu jMenu_Lista;
    private javax.swing.JMenu jMenu_Listar;
    private javax.swing.JMenu jMenu_Remove;
    private javax.swing.JMenu jMenu_Sair;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextArea jTextArea1;
    // End of variables declaration//GEN-END:variables
}
